package com.qianfeng.controller;

import com.qianfeng.pojo.Dept;
import com.qianfeng.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin("*")
public class DeptController {
    @Autowired
    private DeptService deptService;
    @GetMapping("/deptSelectAll")
    public List<Dept> selectAll(){
       return deptService.selectAll();
   }
}
